/**
  ******************************************************************************
  * @file    /WB_Gneiss_Sample_Code_LLD.h
  * @author  Winbond FAE Steam Lin
  * @version V1.1.0
  * @date    09-December-2015
  * @brief   This code provide the low level RPMC hardware operate function based on STM32F205.
  *            
  * COPYRIGHT 2015 Winbond Electronics Corporation.
*/ 
#include WB_Secureic.h

void WB_CS_HIGH();
void WB_CS_LOW();
unsigned char SPIin(unsigned char DI);

unsigned int WB_RPMC_ReadCounterData();

unsigned int WB_RPMC_ReadRPMCstatus(unsigned int checkall);

unsigned int WB_RPMC_WrRootKey(unsigned int cadr,unsigned char *rootkey);
unsigned int WB_RPMC_UpHMACkey(unsigned int cadr,unsigned char *rootkey,unsigned char *hmac4,unsigned char *hmackey);
unsigned int WB_RPMC_IncCounter(unsigned int cadr,unsigned char *hmackey,unsigned char *input_tag);

unsigned char WB_RPMC_Challenge(unsigned int cadr,unsigned char *hmackey,unsigned char *input_tag);

void WB_RPMC_ReqCounter(unsigned int cadr, unsigned char *hmackey,unsigned char *tag);

/************************ (C) COPYRIGHT Winbond Electronics Corporation *****END OF FILE****/